var argv = require('minimist')(process.argv.slice(2));
var merge = require('webpack-merge')
var devEnv = require('./dev.env')
////npm run build --param PD
var service_url_host = 'window.location.origin'
//argv.param = QA | PD



if (argv.param !== "PD") {
  if (typeof argv.param === "undefined") {
    //开发调用接口地址
    devEnv.service_url = service_url_host + ' + "/api/"'
  } else {
    //QA和内部测试、UAT等接口访问地址
    devEnv.service_url = service_url_host + ' + "/"'
  }
  module.exports = merge(devEnv, {
    NODE_ENV: '"production"'
  })
} else {
  //PD
  module.exports = {
    NODE_ENV: '"production"',
    //开发调用接口地址
    service_url: service_url_host + ' + "/onlinequery/"',
  }
}
